.. _Evaluate NeurEco Discrete Dynamic model with GUI:

Evaluate NeurEco Discrete Dynamic model with GUI
=================================================

Evaluation of a dynamic model requires initialization.

The initialization model can be done in two ways in the NeurEco Dynamic:

* **Recommended:** provide explicitly the initialization of the trajectory to evaluate.
  During the build NeurEco deduces the number of time steps *n* necessary for the prediction of the trajectory at the following moment of time.
  The best results are achieved when the model is provided with this number *n* of initial points of trajectory to evaluate.
  If the user feeds NeurEco more steps than *n* needed, all the steps but the last *n* are ignored.
   
  .. note::
    The first step to be predicted by the model is the last step given by the initialization. For example, if the steps *t0*, *t1* and *t2* where given as initialization, the step *t2* will be the first step predicted.

* If explicit initialization is not provided, the evaluation uses the initialization by default: the steady state deduced from the initial values of excitations.

To evaluate the **Discrete Dynamic model**:

* Switch to the **Evaluation** tab

  .. figure:: ../../../images/GUIDiscreteDynamicEvaluationTab.png
    :width: 600
    :alt: **Evaluate** tab for **Discrete Dynamic**
    :align: center

    **Evaluate** tab for **Discrete Dynamic**
		
		
		
* Choose the file to evaluate in **Evaluation files** section:
	
  * If the file was supplied in **Settings** for **Build**, it is already listed in **Evaluation files**

  * To add a new file for evaluation, press **+** in **Additional** section of **Evaluation files**

  * To use for the initialization of the evaluated trajectory, the provided **output file** can be shorter and contain only the beginning of the time sequence of the corresponding input (excitation) file.

  * If no output file is available, click **Set No Output** in **Additional output files** section
	  
* Choose the initialization of the trajectory:

  * When only the **input file** is provided, NeurEco uses the **Steady State Initialization**: the beginning of the trajectory is computed from the steady state deduced from the model. In this case, once the **input file** clicked, the results of evaluation are displayed

  .. figure:: ../../../images/GUIDiscreteDynamicEvaluateDefaultInit.png
    :width: 600
    :alt: **Evaluate** with default initialization
    :align: center

    **Evaluate** with default initialization


  * To provide an explicit initialization (recommended): click on **Initialization interval: select** button. A cursor appears on top of the plots, place the two ends of the cursor on the interval to select as initialization interval and click the evaluate button:

  .. figure:: ../../../images/GUIDiscreteDynamicEvaluateExplicitInit.png
    :width: 600
    :alt: **Evaluate** with explicit initialization
    :align: center

    **Evaluate** with explicit initialization

* To save the results of evaluation into a CSV, NumPy or MAT-file, click **Export** and choose the name of the file and its destination.
	
.. Note::
    
  | By default, the evaluation is performed with the last model available in the checkpoint.
  | Use the checkpoint slider in the bottom to choose any other available model to **Evaluate** it.
